Skip to content

Conversation

@zugao
Copy link
Collaborator

@zugao zugao commented Jan 8, 2026

Summary

  • This PR implements the latest changes of ADR0033. Now the controller handles multiple products instead of 1 (ItemSpec).

Checklist

  • Update tests.
  • Link this PR to related issues.
  • Merge with /merge comment.

Component PR: vshn/component-appcat#1037

@zugao zugao added the minor label Jan 8, 2026
@zugao zugao marked this pull request as draft January 8, 2026 14:04
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@zugao zugao force-pushed the extended-billing branch from de1b436 to b3b7cbe Compare January 9, 2026 16:46
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@zugao zugao requested review from a team, Kidswiss, TheBigLee, mdnix and mikeshootzz and removed request for a team January 16, 2026 14:03
@zugao zugao marked this pull request as ready for review January 16, 2026 14:03
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

Copy link
Contributor

@Kidswiss Kidswiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small things, the rest LGTM


// If no items specified, create default compute item
items := opts.Items
if len(items) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we always inject the service?

If we have a service with multiple items we'd have to pass the service itself explicitly as well, which could lead to a lot of dupes, since most servala services will have more than one item anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make this mandatory and configure as mandatory via kubebuilder?

itemDescription := GetItemDescription(isAPPUiOCloud, clusterName, namespace)

// If no items specified, create default compute item
items := opts.Items
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In accordance with my comment bellow, this field should then be called ExtraItems istead. To make it clear we additional items to the default service item.

Copy link
Collaborator Author

@zugao zugao Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for extra items. Whoever is creating a BIllingService CR should add at least one item in the list.


// Find oldest sent events for this product
// Only prune events with status "sent"
prunableIndices := []int{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we get rid of entries that failed?

We might need some configuration to specify how many failed events we should keep.

Copy link
Collaborator Author

@zugao zugao Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep all of them but to make sure we don't create duplicates. If we remove the ones that were not sent we loose history and we cannot ensure that Odoo has correct data. I would be very cautious with removing events that are not yet in odoo.

@zugao zugao requested a review from Kidswiss January 20, 2026 12:05
Copy link
Contributor

@mikeshootzz mikeshootzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @Kidswiss but the rest looks good to me. One small thing:

Comment on lines -129 to -143
- xobjectbuckets
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- apiextensions.crossplane.io
resources:
- compositeresourcedefinitions
verbs:
- get
- list
- watch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to rebase to develop and run make generate to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants